package com.googlecode.tapestry5validator.hibernate.models;

import java.math.BigDecimal;
import java.util.Date;

import org.hibernate.validator.CreditCardNumber;
import org.hibernate.validator.Digits;
import org.hibernate.validator.EAN;
import org.hibernate.validator.Email;
import org.hibernate.validator.Future;
import org.hibernate.validator.Length;
import org.hibernate.validator.Max;
import org.hibernate.validator.Min;
import org.hibernate.validator.NotNull;
import org.hibernate.validator.Past;
import org.hibernate.validator.Pattern;
import org.hibernate.validator.Range;

public class Car {

	@CreditCardNumber
	private String cc;
	
	@Digits(integerDigits=1, fractionalDigits=1)
	private BigDecimal decimal;

	@EAN
	private String code;
	
	@Email
	private String email;
	
	@Future
	private Date future;
	
	@Length(min=3, max=10)
	private String length;

	@Max(10)
	private int width;

	@Min(3)
	private int min;
	
	@NotNull
	private String notnull;

	@Pattern(regex="mar")
	private String pattern;
	
	@Past
	private Date past;

	@Range(min=50, max=100)
	private int range;
	
	public void setWidth(int width) {
		this.width = width;
	}

	public int getWidth() {
		return width;
	}

	public void setCc(String cc) {
		this.cc = cc;
	}

	public String getCc() {
		return cc;
	}

	public void setDecimal(BigDecimal decimal) {
		this.decimal = decimal;
	}

	public BigDecimal getDecimal() {
		return decimal;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getCode() {
		return code;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getEmail() {
		return email;
	}

	public String getLength() {
		return length;
	}

	public void setLength(String length) {
		this.length = length;
	}

	public void setFuture(Date future) {
		this.future = future;
	}

	public Date getFuture() {
		return future;
	}

	public void setMin(int min) {
		this.min = min;
	}

	public int getMin() {
		return min;
	}

	public void setNotnull(String notnull) {
		this.notnull = notnull;
	}

	public String getNotnull() {
		return notnull;
	}

	public void setPattern(String pattern) {
		this.pattern = pattern;
	}

	public String getPattern() {
		return pattern;
	}

	public void setPast(Date past) {
		this.past = past;
	}

	public Date getPast() {
		return past;
	}

	public void setRange(int range) {
		this.range = range;
	}

	public int getRange() {
		return range;
	}

}
